﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArgusLib.Fractals
{
	public interface IDataSet
	{
		/// <summary>
		/// Gets the x-dimension of the data-array.
		/// </summary>
		int DimensionX { get; }

		/// <summary>
		/// Gets the y-dimension of the data-array.
		/// </summary>
		int DimensionY { get; }

		/// <summary>
		/// Gets the value at a given position in the data-array.
		/// </summary>
		object this[int x, int y] { get; set; }

		/// <summary>
		/// Reset all elements to null.
		/// </summary>
		void Reset();

		/// <summary>
		/// Checks if a given element is null.
		/// </summary>
		bool IsNull(int x, int y);

		/// <summary>
		/// Processes the results of a calculation to provide additional data.
		/// </summary>
		void PostProcess();

		/// <summary>
		/// The parameter which were used to calculate the <c>IDataSet</c>.
		/// </summary>
		IParameter CalculationParameter { get; }

		/// <summary>
		/// Convert screen coordinates to a data value.
		/// </summary>
		object Convert(int x, int y);
	}

	public interface IDataSetProvider
	{
		IDataSet GetDataSet(IParameter parameter);
	}
}
